I'm an extension that allows for scoping the protocols and/or classes viewable in a browser. My intention is to be for educational purposes, to help simplify and direct students to specific classes to help them avoid being overwhelmed by the large class library available in Squeak.
* look up the category index from the system category list, as the browser category index is expected to be different than the system category lists index.
* reject/include any excluded/included classes
Answer an array of the class names of the selected category. Answer an empty array if no selection exists."
| categoryClasses |
"Use temporary variable here, instead of block variable as I've heard Squeak has/had trouble with block variables."
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:20'!
openBrowserTest1
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test category scope creation method - browser should open with 1 protocol and 3 classes"
"self openBrowserTest1"
self openBrowserWithCategories: (OrderedCollection new
add: 'Collections-Abstract' asSymbol;
yourself)! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:20'!
openBrowserTest2
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test exclude classes creation method - browser should open with 1 protocol and 2 classes"
"self openBrowserTest2"
self openBrowserWithCategories: (OrderedCollection new
add: 'Collections-Abstract' asSymbol;
yourself)
withoutClasses: (OrderedCollection new
add: #Collection;
yourself)! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:20'!
openBrowserTest3
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test exclude classes creation method - browser should open with 1 protocol and 2 classes"
"self openBrowserTest3"
self openBrowserWithCategories: (OrderedCollection new
add: 'Collections-Abstract' asSymbol;
yourself)
withoutClasses: (OrderedCollection new
add: #Collection;
yourself)
withLabelSuffix: 'Testing Scope'! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:20'!
openBrowserTest4
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test instantiating with a non-existant category - browser should open with 1 protocol and 2 classes"
"self openBrowserTest4"
self openBrowserWithCategories: (OrderedCollection new
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:20'!
openBrowserTest5
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test instantiating with a non-existant class to exclude - browser should open with 1 protocol and 3 classes"
"self openBrowserTest5"
self openBrowserWithCategories: (OrderedCollection new
add: 'asdfasdfd-ereeff' asSymbol;
add: 'Collections-Abstract' asSymbol;
yourself)
withoutClasses: (OrderedCollection new
add: #Aadfdfefff;
yourself)
withLabelSuffix: 'Testing nonexistant class to exclude'! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:21'!
openBrowserTest6
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test include classes creation method - browser should open with 1 protocol and 1 class"
"self openBrowserTest6"
self openBrowserWithCategories: (OrderedCollection new
add: 'Collections-Abstract' asSymbol;
yourself)
withClasses: (OrderedCollection new
add: #Collection;
yourself)! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:21'!
openBrowserTest7
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test include classes creation method - browser should open with 1 protocol and 1 class"
"self openBrowserTest7"
self openBrowserWithCategories: (OrderedCollection new
add: 'Collections-Abstract' asSymbol;
yourself)
withClasses: (OrderedCollection new
add: #Collection;
yourself)
withLabelSuffix: 'Testing Scope'! !
!ScopedBrowser class methodsFor: 'manual unit testing' stamp: 'JRS 3/18/2001 21:21'!
openBrowserTest8
"Note: As of Squeak 3.0, SUnit has been included with the base image. To run SUnit automatic tests, see ScopedBrowserTestCase class comment. This manual test case has been left in for reference for now."
"Test instantiating with a non-existant class to include - browser should open with 1 protocol and 0 classes"
"self openBrowserTest8"
self openBrowserWithCategories: (OrderedCollection new
add: 'asdfasdfd-ereeff' asSymbol;
add: 'Collections-Abstract' asSymbol;
yourself)
withClasses: (OrderedCollection new
add: #Aadfdfefff;
yourself)
withLabelSuffix: 'Testing nonexistant class to include'! !
!ScopedBrowser class methodsFor: 'testing' stamp: 'JRS 3/18/2001 17:19'!
testedWithSqueakVersion
"These extensions were last tested with this version of Squeak."
^3.0! !
!ScopedBrowser class methodsFor: 'testing' stamp: 'JRS 3/18/2001 17:18'!